package com.spring.demo12.eg6;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author vhans
 */
@Component
public class SendEmailListener {
    @EventListener
    public void emailOnUser(UserRegisterEvent event) {
        System.out.printf("当前线程【%s】,给用户【%s】发送注册成功邮件!\n", Thread.currentThread(), event.getName());
    }
}
